package com.jiegui.wx.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jiegui.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.jiegui.wx.mapper.WechatOnlineServiceMapper;
import com.jiegui.wx.domain.WechatOnlineService;
import com.jiegui.wx.service.WechatOnlineServiceService;

/**
 * 微信客服问题Service业务层处理
 * 
 * @author wuqicheng
 * @date 2021-12-14
 */
@Service
public class WechatOnlineServiceServiceImpl extends ServiceImpl<WechatOnlineServiceMapper, WechatOnlineService> implements WechatOnlineServiceService
{
    @Resource
    private WechatOnlineServiceMapper wechatOnlineServiceMapper;

    /**
     * 查询微信客服问题
     * 
     * @param id 微信客服问题主键
     * @return 微信客服问题
     */
    @Override
    public WechatOnlineService selectWechatOnlineServiceById(Long id)
    {
        return wechatOnlineServiceMapper.selectById(id);
    }

    /**
     * 查询微信客服问题列表
     * 
     * @param wechatOnlineService 微信客服问题
     * @return 微信客服问题
     */
    @Override
    public List<WechatOnlineService> selectWechatOnlineServiceList(WechatOnlineService wechatOnlineService)
    {
        return wechatOnlineServiceMapper.selectWechatOnlineServiceList(wechatOnlineService);
    }

    /**
     * 新增微信客服问题
     * 
     * @param wechatOnlineService 微信客服问题
     * @return 结果
     */
    @Override
    public int insertWechatOnlineService(WechatOnlineService wechatOnlineService)
    {
        return wechatOnlineServiceMapper.insert(wechatOnlineService);
    }

    /**
     * 修改微信客服问题
     * 
     * @param wechatOnlineService 微信客服问题
     * @return 结果
     */
    @Override
    public int updateWechatOnlineService(WechatOnlineService wechatOnlineService)
    {

        return wechatOnlineServiceMapper.updateById(wechatOnlineService);
    }

    /**
     * 批量删除微信客服问题
     * 
     * @param ids 需要删除的微信客服问题主键
     * @return 结果
     */
    @Override
    public int deleteWechatOnlineServiceByIds(Long[] ids)
    {
        return wechatOnlineServiceMapper.delete(new LambdaQueryWrapper<WechatOnlineService>().in(WechatOnlineService::getId,ids));
    }

    /**
     * 删除微信客服问题信息
     * 
     * @param id 微信客服问题主键
     * @return 结果
     */
    @Override
    public int deleteWechatOnlineServiceById(Long id)
    {
        return wechatOnlineServiceMapper.deleteById(id);
    }
}
